package com.h3c.nem.task;

import com.h3c.nem.service.ITbTeacherService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@JobHandler(value="teacherCertifiedJobHandler")
public class TeacherCertifiedJobHandler extends IJobHandler {

    @Resource
    private ITbTeacherService iTbTeacherService;

    @Override
    public ReturnT<String> execute(String teacherId) throws Exception {
        XxlJobLogger.log("teacherCertifiedJobHandler, 入参：{}", teacherId);
        iTbTeacherService.updateTeacherCertified(teacherId);
        return SUCCESS;
    }
}
